export default [
    {
        path: '/index',
        name: 'index',
        meta: { title: '考勤管理' },
        component: () => import('../views/Index.vue'),
        children: [
            {
                path: '/index/goout',
                name: 'goout',
                meta: { title: '出差申请' },
                component: () => import('../components/Index/GoOut.vue')
            },
            {
                path: '/index/field',
                name: 'field',
                meta: { title: '外勤打卡' },
                component: () => import('../components/Index/Field.vue')
            },
            {
                path: '/index/leave',
                name: 'leave',
                meta: { title: '请假申请' },
                component: () => import('../components/Index/Leave.vue')
            },
            {
                path: '/index/work',
                name: 'work',
                meta: { title: '加班申请' },
                component: () => import('../components/Index/Work.vue')
            },
            {
                path: '/index',
                redirect: '/index/goout'
            },
            {
                path: '/index/:error(.*)',
                component: () => import('../views/NotFound.vue')
            },
        ]
    },
    {
        path: '/login',
        name: 'login',
        meta: { title: '考勤管理-登陆' },
        component: () => import('../views/Login.vue')
    },
    {
        path: '/register',
        name: 'register',
        meta: { title: '考勤管理-注册' },
        component: () => import('../views/Register.vue')
    },
    {
        path: '/',
        redirect: '/index'
    },
    {
        path: '/:error(.*)',
        component: () => import('../views/NotFound.vue')
    },
]